<?php

include('../include/api.php');
include('../include/security.php');
include($siteLocalPath."/dbConnect.php");
include($siteLocalPath."/classes/class.page.php");
include($siteLocalPath."/classes/class.member.php");
include ($siteLocalPath."/libs/grid/phpmydatagrid.class.php");
// Load member data
$gid=$_REQUEST["gid"];

include($siteLocalPath."/classes/class.service.php");	
$myservice =new service();
$serviceArr=$myservice->find("serviceID='".$cuService."'"); //."' and categoryLang='".$_SESSION['S_memberLang']."'");
if(!$gid) $gid=$serviceArr[0]['serviceID'];

$member=new Member();
$mdata=$member->find("member_ID='".$_SESSION['S_memberID']."'");

/* Create object */
	$objGrid = new datagrid;
	$objGrid -> methodForm("post");
	$objGrid ->pathtoimages($siteHttpPath."/libs/grid/images/");
	$objGrid -> friendlyHTML();
	$objGrid -> closeTags(true);  
	$objGrid ->language($_SESSION['S_memberLang']);
	$objGrid -> form('skyform',true);
	$objGrid -> searchby("categoryName,categoryDes,serviceID"); 
$objGrid->isADO;
	$objGrid -> conectadb($host, $usernamedb, $passworddb, $database,true,$dbtype);
	$objGrid -> tabla ("category");
	$objGrid -> buttons(true,true,true,true);
	$objGrid -> keyfield("categoryID");

	
	$objGrid -> decimalDigits(2);
	$objGrid -> decimalPoint(",");

	
	$objGrid -> datarows(30); 
	$objGrid -> paginationmode('links'); 
	$objGrid -> linkparam("gid=".$_REQUEST["gid"]);	

	
	$objGrid -> FormatColumn("categoryID","categoryID", 0, 0, 2, "0",0,0);
	$objGrid -> FormatColumn("categoryName",$Q['categoryName'], 30, 30, 0, "100");
	$objGrid -> FormatColumn("categoryDes",$Q['desc'], 30, 30, 0, "100");
	$objGrid -> FormatColumn("categoryLang",$Q['lang'], 30, 30, 0, "100","center","select:select langName,langTitle From language");
	$objGrid -> FormatColumn("serviceID",$Q['service'], 30, 30, 0, "100","center","select:SELECT serviceID,serviceName From service");
	$objGrid -> FormatColumn("categoryOrderID",$Q['order'], 30, 30, 0, "50");


	
	$pageTitleUp=$Q['categoryAdmin'];
	$pageTitle=$Q['categoryAdmin'];
	
	include($themesLocalPath."/".$themeName."templates/master.php");
	

?>
